home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1996 / MacHack 1996.toast / Hacks / Hacks '96 / 3D No 'doz / Source / SAGlobals / SAGlobals.h next >
Encoding:
C/C++ Source or Header  |  1996-06-22  |  2.2 KB  |  71 lines  |  [TEXT/SPM ]

  1. /*
  2.     SAGlobals.h
  3.     Based on SAGlobals unit, © Apple Computer
  4.     Created for Symantec C++ 8.x by Glenn L. Austin
  5.     
  6.     The A5 world created for globals is created in the same heap as the code
  7.     resource, based upon the address of InitA5 in relation to ApplicZone.
  8.     
  9.     The A5 world is a handle which is moved high in the application's heap
  10.     and then locked.  This handle is left locked unless you explicitly unlock it.
  11. */
  12.  
  13.  
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17.  
  18. #if PRAGMA_IMPORT_SUPPORTED
  19. #pragma import on
  20. #endif
  21.  
  22. /********************************************************************************
  23. **    InitA5()
  24. **    
  25. **    Creates an A5 world for globals.  Returns TRUE if successful, FALSE
  26. **    otherwise.
  27. ********************************************************************************/
  28. extern pascal Boolean    InitA5(void);
  29.  
  30. /********************************************************************************
  31. **    SetUpA5()
  32. **    
  33. **    Makes sure the A5 world is moved high and locked, then it saves off the
  34. **    current A5 and initializes the A5 world for globals.
  35. ********************************************************************************/
  36. extern pascal void        SetUpA5(void);
  37.  
  38. /********************************************************************************
  39. **    RestoreA5()
  40. **    
  41. **    Restores the old A5 value saved off in SetUpA5().
  42. ********************************************************************************/
  43. extern pascal void        RestoreA5(void);
  44.  
  45. /********************************************************************************
  46. **    DisposeA5()
  47. **    
  48. **    Disposes of the A5 world for globals.
  49. **
  50. **    •NOTE•    Make SURE that you've called RestoreA5 before calling DisposeA5!
  51. ********************************************************************************/
  52. extern pascal void        DisposeA5(void);
  53.  
  54. /********************************************************************************
  55. **    UnlockA5()
  56. **    
  57. **    Unlocks the A5 world so that it can float in the heap.
  58. **
  59. **    •NOTE•    Do not call this if you have variables that are set as pointers
  60. **            to other variables or data -- like strings.
  61. ********************************************************************************/
  62. extern pascal void        UnlockA5(void);
  63.  
  64. #if PRAGMA_IMPORT_SUPPORTED
  65. #pragma import off
  66. #endif
  67.  
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71.